﻿/**
 *
 * @file   FITKVAOneHDF5Writer.h
 * @brief  VAOne HDF5 写出
 * @author TanDongYang (tandongyang@diso.cn)
 * @date   2024-11-22
 *
 */

#ifndef FITKVAONEHDF5WRITER_H
#define FITKVAONEHDF5WRITER_H

#include "FITK_Interface/FITKInterfaceIO/FITKAbstractHDF5Writer.h"

namespace Acoustics
{
    class FITKAcousticsPostData;
}

namespace VAOne 
{
    class FITKVAOneHDF5IOInterface;

    /**
     * @brief   VAOne HDF5 写出
     * @author  TanDongYang (tandongyang@diso.cn)
     * @date    2024-11-22 
     */
    class FITKVAOneHDF5Writer : public IO::FITKAbstractHDF5Writer
    {
    public:
        /**
         * @brief   Construct a new FITKVAOneHDF5Writer object
         * @param[i]   interface      组件指针，可传递参数
         * @param[i]   isSuccess      是否执行成功
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-22 
         */
        explicit FITKVAOneHDF5Writer(FITKVAOneHDF5IOInterface* interface, bool & isScuccess);

        /**
         * @brief   Destroy the FITKVAOneHDF5Writer object
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-22 
         */
        virtual ~FITKVAOneHDF5Writer() = default;

        /**
         * @brief   执行写出操作
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-22 
         */
        void run() override;

    private:

        /**
         * @brief       打印控制台消息
         * @param[i]   level 打印级别 1 normal 2 warning 3error
         * @param[i]   str 打印的信息
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-22 
         */
        void consoleMessage(int level, const QString& str) override;

        /**
         * @brief   组件对象指针
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-22
         */
        FITKVAOneHDF5IOInterface* _compInterface{};

        /**
         * @brief   是否执行成功
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-22
         */
        bool & _isSuccess;

        /**
         * @brief   后处理数据对象指针
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-22
         */
        Acoustics::FITKAcousticsPostData* _postData{};
    };
}
#endif // FITKVAONEHDF5WRITER_H
